package org.example.api.goods.goods.enums;

import lombok.Getter;

@Getter
public enum GoodsTagTypeEnum {
  /**
   * 服务保障
   */
  SERVICE_GUARANTEE("1","服务保障");

  final String code;
  final String desc;

  GoodsTagTypeEnum(String code, String desc) {
    this.code = code;
    this.desc = desc;
  }
  // 根据code 获取枚举
  public static GoodsTagTypeEnum getByCode(String code) {
    for (GoodsTagTypeEnum goodsTagTypeEnum : GoodsTagTypeEnum.values()) {
      if (goodsTagTypeEnum.getCode().equals(code)) {
        return goodsTagTypeEnum;
      }
    }
    return null;
  }
}
